import 'package:flutter_screenutil/flutter_screenutil.dart';

/**
 * 麻将的一些常量信息
 */
class MahjongSystemConst {
  MahjongSystemConst._();
  static final double bodyTextFontDefalutSize = 13.sp;

  static final double bodyTextFontMiniSize = 14.sp;

  static final double defaultBodyPadding = 5.h;

  static double actionHeight = ScreenUtil().screenHeight / 8;

  static double messageIconHeight = 30.h;

  static double mahjongTopBarHeight = 30.h;

  // 牌的 高度是宽度的 1.6 倍
  static final double cardWHScale = 1.6;
  static final double cardOtherScale = 0.23;
  static final double cardMinWHScale = 3 / 4;
  // 常规下  手牌最大的 占位 倍数
  static final double cardMultiple = 20.5;
  // 常规下  手牌最大的 占位 倍数
  static final double cardLrMultiple = 22.5;
  // 中间 东南西北风的高度
  static final double centerLRBT = ScreenUtil().screenHeight / 7;
  // 用户出牌的  区域 宽高
  static final double exportAreaSize = ScreenUtil().screenHeight / 3;
  // 用户出牌的 宽度
  static final double exportAreaCardWidth = exportAreaSize / 7;

  // 钻石的比例
  static final double cardMasonryWScale = 0.8;
  static final double cardMasonryHScale = cardMasonryWScale * 1.27;

  // 当前用户 手牌的宽度
  static final double bottomHandCardWidth =
      hasSafe ? exportAreaCardWidth * 1.7 : lrUserCardMargin / 15;

  static final double userHeaderImageWidth = ScreenUtil().screenHeight / 10;

  // 头像高度
  static final double userHeaderImageHeight = userHeaderImageWidth + 16.h;

  static final double topUserCardWidth = exportAreaSize / 9 * 4 / 3;

  static final double lrCardWidth = exportAreaCardWidth * 3 / 4;
  // 一般用于 左右两边 出牌 的 区域 间距   比如左边   就需要 right 这个值
  static final double lrlrMagin =
      ScreenUtil().screenWidth / 2 + exportAreaSize / 2;

  static final double lrbtMagin =
      ScreenUtil().screenHeight / 2 - exportAreaSize / 2;

  // 一般用于 左右两边 出牌 的 区域 间距   比如左边   就需要 right 这个值
  static final double btExportMagin =
      ScreenUtil().screenHeight / 2 + centerLRBT / 2;
  // 左右用户手牌
  static final double lrUserCardMargin = lrlrMagin + exportAreaSize;
  static final double lrUserCardWidth = exportAreaCardWidth * cardMinWHScale;
  // 左右头像距离
  static final double lrUserHeaderMargin =
      lrUserCardMargin + lrUserCardWidth * 2;

  // 碰杠胡 行为提示
  static final double actionTipsWidth = ScreenUtil().screenHeight / 10;

  static final bool hasSafe =
      ScreenUtil().statusBarHeight > 0 || ScreenUtil().bottomBarHeight > 0;
  static final double edgeMargin =
      ScreenUtil().statusBarHeight > 0 || ScreenUtil().bottomBarHeight > 0
          ? 0.00
          : 5.w;
  // 上下交换的牌的宽度
  static final double btSwapCardWidth = ScreenUtil().screenWidth / 30;

  // 筛子的高度
  static final double diceSize = centerLRBT / 2;
}
